home *** CD-ROM | disk | FTP | other *** search
Text File | 1998-09-03 | 9.3 KB | 336 lines | [TEXT/MPS ] |
- /*
- File: ChooserPACK.r
-
- Contains: Rsrc description to build the PACK header and other rsrcs
- needed by the PACK code
-
- */
-
- /***********************************************************************************/
- /**** Includes ****/
- /***********************************************************************************/
- #ifndef __CHOOSERPACK__
- #define __CHOOSERPACK__
-
- #ifndef __COMMON__
- #include "Common.h"
- #endif
-
- #ifndef __SYSTYPES_R__
- #include "Types.r" /* To get system types */
- #endif
-
- #ifndef __SYSTYPES_R__
- #include "SysTypes.r"
- #endif
-
- /***********************************************************************************/
- /**** PACK ****/
- /***********************************************************************************/
- /*
- * When building a PACK resource, insert the line:
- *
- * type 'PACK' as 'PACW';
- *
- * in your resource file before your "resource 'PACK' ..." declaration.
- */
-
- type 'PACW' {
- unsigned integer = $600e; /* bra.s to offset $e */
- unsigned integer = 0; /* device ID (Usually 0) */
- literal longint = 'PACK'; /* res type, always PACK */
- integer = kPACKID; /* res ID always -4096 */
- integer; /* version of driver */
-
- /*
- Values for flags obtained from Chooser source code file RDEVEqu.a and
- IM Devices, pp 1-46…
- */
- boolean notAppleTalkDev, appleTalkDev; /* 31:Appletalk device? */
- boolean notPAPDev, papDev; /* 30:Printer Access Protocol device? */
- boolean notPostScriptDev, postScriptDev; /* 29:PostScript device? */
- boolean noMultiples, multiples; /* 28:multiple selections? */
- boolean noLeftButton, leftButton; /* 27:uses left button */
- boolean noRightButton, rightButton; /* 26:uses right button */
- boolean saveZone, dontSaveZone; /* 25:saved zone name */
- boolean doesntUseZones, usesZones; /* 24:uses zone names name */
- boolean intlChars, noIntlChars; /* 23:Translate int'l chars to U.S.? */
- boolean noEvenName, evenName; /* 22:Is this a LaserWriter? */
- boolean noLengthOnRename, lengthOnRename; /* 21:Pass length byte in Rename name? */
- boolean noOnOff, onOff; /* 20:Device uses on/off radio buttons. */
- boolean selfSend, dontSelfSend; /* 19:Receive info from this machine? */
- boolean = 0; /* 18:reserved */
- boolean doesntAcceptInit, acceptsInit; /* 17:accepts Initialize msg */
- boolean doesntAcceptNewSel, acceptsNewSel; /* 16:accepts newSel msg */
- boolean doesntAcceptFillList, acceptsFillList; /* 15:accepts FillList msg */
- boolean doesntAcceptGetSel, acceptsGetSel; /* 14:accepts GetSel msg */
- boolean doesntAcceptSelect, acceptsSelect; /* 13:accepts Select msg */
- boolean doesntAcceptDeselect, acceptsDeselect; /* 12:accepts Deselect msg */
- boolean doesntAcceptTerm, acceptsTerm; /* 11:accepts Terminate msg */
- boolean doesntAcceptRename, acceptsRename; /* 10:accepts Rename msg */
- boolean = 0; /* 9:reserved */
- boolean = 0; /* 8:reserved */
- boolean = 0; /* 7:reserved */
- boolean = 0; /* 6:reserved */
- boolean = 0; /* 5:reserved */
- boolean = 0; /* 4:reserved */
- boolean = 0; /* 3:reserved */
- boolean = 0; /* 2:reserved */
- boolean = 0; /* 1:reserved */
- boolean packExists, noPackage; /* 0:Is the Package really there? */
-
- /*
- The PACK code is inserted here by Rez. Use the $$Resource() directive…
- */
- hex string;
- };
-
- type 'CTYP' {
- unsigned integer = 0; /* type of connection for selected printer 0-none 1-serial 2-UBB */
- unsigned integer doesntSupportSerial, supportsSerial;
- unsigned integer doesntSupportUSB, supportsUSB;
- };
-
- /*
- * What connection types we support and the type of connection for the selected printer
- */
- resource 'CTYP'(1000, purgeable ) {
- supportsSerial,
- supportsUSB
- };
-
- /*
- * Path in name registry for the printer models this driver supports
- */
- resource 'STR#'(1000, purgeable ) {
- {
- "Devices:device-tree:PRINTER:Color StyleWriter 6500",
- "Devices:device-tree:PRINTER:DeskJet 870C",
- }
- };
-
- /*
- * Path in name registry for the last selected usb printer
- * The code should not change the size of the rsrcs.
- * Therefore this rsrc must be kepted at a fixed length
- * size of 256 bytes!
- */
-
- data 'STR ' (2000, purgeable) {
- $"0000 0000 0000 0000 0000 0000 0000 0000"
- $"0000 0000 0000 0000 0000 0000 0000 0000"
- $"0000 0000 0000 0000 0000 0000 0000 0000"
- $"0000 0000 0000 0000 0000 0000 0000 0000"
- $"0000 0000 0000 0000 0000 0000 0000 0000"
- $"0000 0000 0000 0000 0000 0000 0000 0000"
- $"0000 0000 0000 0000 0000 0000 0000 0000"
- $"0000 0000 0000 0000 0000 0000 0000 0000"
- $"0000 0000 0000 0000 0000 0000 0000 0000"
- $"0000 0000 0000 0000 0000 0000 0000 0000"
- $"0000 0000 0000 0000 0000 0000 0000 0000"
- $"0000 0000 0000 0000 0000 0000 0000 0000"
- $"0000 0000 0000 0000 0000 0000 0000 0000"
- $"0000 0000 0000 0000 0000 0000 0000 0000"
- $"0000 0000 0000 0000 0000 0000 0000 0000"
- $"0000 0000 0000 0000 0000 0000 0000 0000"
- };
-
- /*
- * Name of last selected usb printer
- * The code should not change the size of the rsrcs.
- * Therefore this rsrc must be kepted at a fixed length
- * size of 256 bytes!
- */
-
- data 'STR ' (2100, purgeable) {
- $"0000 0000 0000 0000 0000 0000 0000 0000"
- $"0000 0000 0000 0000 0000 0000 0000 0000"
- $"0000 0000 0000 0000 0000 0000 0000 0000"
- $"0000 0000 0000 0000 0000 0000 0000 0000"
- $"0000 0000 0000 0000 0000 0000 0000 0000"
- $"0000 0000 0000 0000 0000 0000 0000 0000"
- $"0000 0000 0000 0000 0000 0000 0000 0000"
- $"0000 0000 0000 0000 0000 0000 0000 0000"
- $"0000 0000 0000 0000 0000 0000 0000 0000"
- $"0000 0000 0000 0000 0000 0000 0000 0000"
- $"0000 0000 0000 0000 0000 0000 0000 0000"
- $"0000 0000 0000 0000 0000 0000 0000 0000"
- $"0000 0000 0000 0000 0000 0000 0000 0000"
- $"0000 0000 0000 0000 0000 0000 0000 0000"
- $"0000 0000 0000 0000 0000 0000 0000 0000"
- $"0000 0000 0000 0000 0000 0000 0000 0000"
- };
-
- /*
- * Color table for no Name Registry alert dialog
- */
- resource 'actb' (3000) {
- { /* array ColorSpec: 5 elements */
- /* [1] */
- wContentColor, 65535, 65535, 65535,
- /* [2] */
- wFrameColor, 0, 0, 0,
- /* [3] */
- wTextColor, 0, 0, 0,
- /* [4] */
- wHiliteColor, 0, 0, 0,
- /* [5] */
- wTitleBarColor, 65535, 65535, 65535
- }
- };
-
- /*
- * Alert used when Name Registry isnt present
- */
- resource 'ALRT' (3000) {
- {50, 30, 180, 430},
- 3000,
- { /* array: 4 elements */
- /* [1] */
- OK, visible, sound1,
- /* [2] */
- OK, visible, sound1,
- /* [3] */
- OK, visible, sound1,
- /* [4] */
- OK, visible, sound1
- }
- ,alertPositionMainScreen
- };
-
- /*
- * DITL for alert
- */
- resource 'DITL' (3000) {
- { /* array DITLarray: 2 elements */
- /* [1] */
- {97, 313, 117, 387},
- Button {
- enabled,
- "OK"
- },
- /* [2] */
- {13, 74, 84, 387},
- StaticText {
- disabled,
- "The Name Registry is missing from this c"
- "omputer. It is required by this driver t"
- "o function properly."
- }
- }
- };
-
- /*
- * Color table for printer not available alert dialog
- */
- resource 'actb' (3100) {
- { /* array ColorSpec: 5 elements */
- /* [1] */
- wContentColor, 65535, 65535, 65535,
- /* [2] */
- wFrameColor, 0, 0, 0,
- /* [3] */
- wTextColor, 0, 0, 0,
- /* [4] */
- wHiliteColor, 0, 0, 0,
- /* [5] */
- wTitleBarColor, 65535, 65535, 65535
- }
- };
-
- /*
- * Alert used when Name Registry isnt present
- */
- resource 'ALRT' (3100) {
- {50, 30, 180, 430},
- 3100,
- { /* array: 4 elements */
- /* [1] */
- OK, visible, sound1,
- /* [2] */
- OK, visible, sound1,
- /* [3] */
- OK, visible, sound1,
- /* [4] */
- OK, visible, sound1
- }
- ,alertPositionMainScreen
- };
-
- /*
- * DITL for alert
- */
- resource 'DITL' (3100) {
- { /* array DITLarray: 2 elements */
- /* [1] */
- {97, 313, 117, 387},
- Button {
- enabled,
- "OK"
- },
- /* [2] */
- {13, 74, 84, 387},
- StaticText {
- disabled,
- "The previously selected printer cannot b"
- "e found. Please make sure the printer is"
- " on, check the connections or make anoth"
- "er selection."
- }
- }
- };
-
-
- /*
- * This will produce a PACK resource from the special PACW type.
- * (this eliminates the need for using the Assembler to create
- * the DA header, but makes it impossible to use SADE, oops!)
- *
- */
-
- type 'PACK' as 'PACW'; /* Map 'PACW' => 'PACK' */
-
- resource 'PACK' (kPACKID, purgeable) {
- /*
- * device version
- */
- 3,
-
- /*
- * PACK flags
- */
- notAppleTalkDev, /* non appletalk device */
- notPAPDev, /* non PAP device */
- notPostScriptDev, /* non PostScript device */
- noMultiples, /* multiple instances */
- noLeftButton, /* use left button */
- noRightButton, /* use right button */
- dontSaveZone, /* save zone name */
- doesntUseZones, /* uses zone names name */
- intlChars, /* let international chars through */
- noEvenName, /* not a LaserWriter; leave the name alone */
- noLengthOnRename, /* don't send the length byte with the name */
- noOnOff, /* doesn't use on/off button */
- selfSend, /* not really relevant */
- acceptsInit, /* Accepts the Initialize msg */
- doesntAcceptNewSel, /* no newSel msg */
- acceptsFillList, /* FillList msg */
- acceptsGetSel, /* accepts GetSel msg */
- acceptsSelect, /* accepts Select msg */
- acceptsDeselect, /* Deselect msg */
- acceptsTerm, /* accept Terminate msg */
- doesntAcceptRename, /* doesn't accept rename msg */
- packExists, /* package really exists */
-
- /*
- * This directive inserts the contents of the PACW resource
- * with our PACK code
- */
- #ifdef __MPW__
- $$Resource("::ChsrPACW.rsrc", 'PACW', 0)
- #else
- $$Resource("ChsrPACW.rsrc", 'PACW', 0)
- #endif
- };
-
- #endif